﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="KMrpt4.aspx.cs" Inherits="KMrpt4"
    EnableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>条码打印输出</title>
    <link href="css/global.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery/jquery-1.8.1.min.js" type="text/javascript"></script>
    <script src="My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="js/msgbox.js" type="text/javascript"></script>
    <link href="css/msgsty.css" rel="stylesheet" type="text/css" />
    <script src="js/main.js" type="text/javascript"></script>
    <script src="js/Gvtools.js" type="text/javascript"></script>
    <script type="text/javascript">
        function funGrilViewScroll() {
            if (document.getElementById("gvTitle") == null) {
                var gdvList = document.getElementById("GridView1");
                var gdvHeader = gdvList.cloneNode(true);
                for (i = gdvHeader.rows.length - 1; i > 0; i--) {
                    gdvHeader.deleteRow(i);
                }
                document.getElementById("divTitle").appendChild(gdvHeader);

                gdvList.deleteRow(0);

                //gdvList.rows[0].style.display = 'none';
            }
        }
        $(document).ready(function () {
            SetPageBakguand($(".bg"));
            SetGvFloat("GridView1");
            $('#business').click(function () {
                if ($('.shoplist').css('display') == "none") {
                    $('.shoplist').css('display', 'block');
                }
                else {
                    $('.shoplist').css('display', 'none');
                }
            });
            $('#Button1').click(function () {
                $("#loading-mask").show();
            });
            $('input[type="checkbox"]').each(function () {
                $(this).click(function () {
                    var val = $('#business').val();
                    var chkVal = $(this).val();
                    if (chkVal == "on") {
                        return;
                    }
                    if ($(this).attr('checked') == 'checked') {
                        $('#business').val(val + chkVal + ';');
                    }
                    else {
                        var result = val.replace(chkVal + ';', '');
                        $('#business').val(result);
                    }
                })
            });
            $('#chkclose').click(function () {
                $('.shoplist').css('display', 'none');
            });
            $('#chkclear').click(function () {
                $('#business').val('');
            });
            $('#chkall').click(function () {
                $('.shoplist').css('display', 'none');
            });
            $('#GridView1 a').click(function () {
                $("#loading-mask").show();
            });

        })
    </script>
    <style>
        .shoplist
        {
            width: 350px;
            display: none;
            border: 1px solid #ccd6de;
            position: fixed;
            z-index: 999;
            background-color: White;
            padding: 5px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div class="rptTitle">
            <b>条码打印输出</b>
        </div>
        <div class="param_div">
            <div class="input-group">
                <span class="input-group-addon">开始日期：</span>
                <asp:TextBox ID="txtsdate" runat="server" class="form-control" placeholder="开始日期"
                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"></asp:TextBox>
            </div>
            <div class="input-group">
                <span class="input-group-addon">结束日期：</span>
                <asp:TextBox ID="txtedate" runat="server" class="form-control" placeholder="结束日期"
                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"></asp:TextBox>
            </div>
            <div class="input-group">
                <span class="input-group-addon">年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 份：</span>
                <asp:TextBox ID="txtyear" runat="server" class="form-control" placeholder="年份"></asp:TextBox>
            </div>
            <div class="input-group">
                <span class="input-group-addon">季&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 节：</span>
                <asp:TextBox ID="txtseason" runat="server" class="form-control" placeholder="季节"></asp:TextBox>
            </div>
            <div class="input-group">
                <span class="input-group-addon">供应商代码：</span>
                <asp:TextBox ID="txtvcode" runat="server" class="form-control" placeholder="供应商代码"></asp:TextBox>
            </div>
            <div class="input-group">
                <span class="input-group-addon">供应商简称：</span>
                <asp:TextBox ID="txtvname" runat="server" class="form-control" placeholder="供应商简称"></asp:TextBox>
            </div>
            <div class="input-group">
                <span class="input-group-addon">款号：</span>
                <asp:TextBox ID="txtstyleno" runat="server" class="form-control" placeholder="款号"></asp:TextBox>
            </div>
            <div class="input-group">
                <%-- <a href="#" class="btn btn-info btn-lg btn-animate-demo">查询</a>--%>
                <asp:Button ID="Button1" runat="server" Text="查询" class="btn btn-info btn-lg btn-animate-demo"
                    OnClick="Button1_Click" />
                <asp:Button ID="Button2" runat="server" Text="导出EXCEL" class="btn btn-info btn-lg btn-animate-demo"
                    OnClick="Button2_Click" />
                <%--<input id="btnfind" type="button" value="查询"  class="btn btn-info btn-lg btn-animate-demo"/>--%>
            </div>
        </div>
        <div class="grid_div">
            <div id="Div2" style="-moz-border-radius: 15px; border-radius: 15px; margin: 5px;
                background-color: #ededed; padding: 8px; font-size: 15px; color: #8d8d8d;">
                <div>
                    <span style="color: #ff0000;"><strong>&nbsp; &nbsp; 提示：</strong> </span>由于数据量过大，导出功能只能导出当前页数据，如果想要导出全部请按分页再导出(每一页导出2千条数据。)。
                </div>
            </div>
            <div class="mycss" id="divGvData" runat="server" style="position: relative; top: 0px;
                left: 0px; width: 100%;" onscroll="funGrilViewScroll(); return false;">
                <div class="bg div_center">
                </div>
                <asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="#CCCCCC"
                    BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Horizontal"
                    Width="1600px" AutoGenerateColumns="False" EmptyDataText="暂无数据" ShowHeaderWhenEmpty="True"
                    OnPageIndexChanging="GridView1_PageIndexChanging" AllowSorting="True" OnDataBound="GridView1_DataBound"
                    OnSorting="GridView1_Sorting" OnRowDataBound="GridView1_RowDataBound" AllowPaging="True"
                    PageSize="2000">
                    <Columns>
                        <asp:BoundField HeaderText="制单日期" DataField="billdate" SortExpression="billdate">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="单据状态" DataField="cnstatename" SortExpression="cnstatename">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="供应商简称" DataField="VendCustName" SortExpression="VendCustName">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="供应商代码" DataField="vendcustcode" SortExpression="vendcustcode">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="款号" DataField="STYLECODE" SortExpression="STYLECODE">
                            <HeaderStyle Width="120px" />
                            <ItemStyle Width="120px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="尺码" DataField="SizeName">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="型号" DataField="SHOETREENO">
                            <HeaderStyle Width="150px" />
                            <ItemStyle Width="150px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="条形码" DataField="barcode">
                            <HeaderStyle Width="150px" />
                            <ItemStyle Width="150px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="货品简称" DataField="MATERIALSHORTNAME" SortExpression="MATERIALSHORTNAME">
                            <HeaderStyle Width="100px" />
                            <ItemStyle Width="100px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="颜色名称" DataField="COLORNAME">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="颜色代码" DataField="colorcode">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="吊牌价" DataField="RETAILPRICE" DataFormatString="{0:N2}">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="面料" DataField="STUFFNAME">
                            <HeaderStyle Width="150px" />
                            <ItemStyle Width="150px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="面料2" DataField="MASTERITEM">
                            <HeaderStyle Width="100px" />
                            <ItemStyle Width="100px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="里料" DataField="SUBITEM">
                            <HeaderStyle Width="100px" />
                            <ItemStyle Width="100px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="填充料" DataField="TEXTURE">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="充绒量">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="执行标准" DataField="SENDCHECKNO">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="安全技术类别" DataField="SUBSERIES">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="洗涤标准" DataField="FOREIGNNAME">
                            <HeaderStyle Width="100px" />
                            <ItemStyle Width="100px" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="数量" DataField="Qty" SortExpression="Qty" DataFormatString="{0:N0}">
                            <HeaderStyle Width="80px" />
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                    </Columns>
                    <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                    <PagerSettings FirstPageText="首页" LastPageText="末页" NextPageText="下一页" PageButtonCount="5"
                        PreviousPageText="上一页" />
                    <PagerStyle BorderColor="#66FF66" Font-Names="宋体" Font-Size="12px" />
                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F7F7F7" />
                    <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
                    <SortedDescendingCellStyle BackColor="#E5E5E5" />
                    <SortedDescendingHeaderStyle BackColor="#242121" />
                </asp:GridView>
            </div>
        </div>
        <div id='loading-mask'>
            <div id="loading">
                <div class="loading-indicator">
                    <img src="images/0504317.gif" width="48" height="48" style="margin-right: 8px;" />
                    <br />
                    <span id="loading-msg">数据加载中...</span>
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
